//输入10个学生的成绩，求平均成绩，并将低于平均成绩的分数打印出来:
#include <iostream>
#include <iomanip>
using namespace std;
void readdata(float score[10]){
    cout<<"Please input 10 student's score:"<<endl;
	for(int i=0;i<10;i++){
		cin>>score[i];
	}
	return;
}

float aver(float score[10]){
	float sum=0;
	int i;
	for(i=0;i<10;i++){
		sum +=score[i];
	}
	return (sum/10);
}

void print(float score[10],float ave){
	int i;
	cout<<"the scores which are below the average:";
	for(i=0;i<10;i++){
		if(score[i]<ave){
			cout<<score[i]<<" ";
		}
	}	
	return;

}

void main(){
	void readdata(float score[10]);
	float aver(float score[10]);
	void print(float score[10],float ave);
	float ave,score[10];
	readdata(score);
	ave=aver(score);
	cout<<"average="<<ave<<endl;
	print(score,ave);
	system("PAUSE");
}